Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: unify MapViews styleURL and styleJSON to mapStyle #559

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

KiwiKilian
Copy link
Collaborator

Fixes #512

Migration docs on separate PR.

@KiwiKilian KiwiKilian requested a review from tyrauber December 16, 2024 07:15
Copy link
Collaborator

@tyrauber tyrauber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. How about adding some success and failure tests to indicate the api change?

# Conflicts:
#	src/MLRNModule.ts
@KiwiKilian KiwiKilian closed this Dec 17, 2024
@KiwiKilian KiwiKilian reopened this Dec 17, 2024
@KiwiKilian
Copy link
Collaborator Author

How do you mein "success" and "failure" tests?

I probably should be adding tests for the mapStyle prop, right. But I'm not sure what you mean by success and failure.

@tyrauber
Copy link
Collaborator

Sorry, because of the api change, writing two tests, a success case that shows how to properly use the new prop, and a failure case that ensures that using the old prop fails in the expected way, and hopefully gracefully. I know our test suite is severely lacking ATM though. We can merge this in and address test coverage in another branch at a later date.

@KiwiKilian
Copy link
Collaborator Author

KiwiKilian commented Dec 17, 2024

Passing one of the old props will simply do nothing. If one uses TypeScript there should be a linting error.

@KiwiKilian KiwiKilian merged commit 7d22f16 into maplibre:beta Dec 17, 2024
13 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 17, 2024
# [10.0.0-beta.11](v10.0.0-beta.10...v10.0.0-beta.11) (2024-12-17)

### Features

* unify `MapView`s `styleURL` and `styleJSON` to `mapStyle` ([#559](#559)) ([7d22f16](7d22f16))

### BREAKING CHANGES

* remove `styleURL` and `styleJSON` from `MapView`, use `mapStyle` instead
Copy link

🎉 This PR is included in version 10.0.0-beta.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants